package com.itheima.job;

import java.util.*;

public class Test05 {
    public static void main(String[] args) {
        HashMap<String,HashMap<String, ArrayList<String>>> hm = new HashMap<>();

//        ArrayList<HashMap<String, ArrayList<String>>> hashArray = new ArrayList<>();

        HashMap<String, ArrayList<String>> hm1 = new HashMap<>();
        ArrayList<String> al1 = new ArrayList<>();
        Collections.addAll(al1,"海港区","山海关区","北戴河区","昌黎县");
//        al1.add("海港区");
//        al1.add("山海关区");
//        al1.add("北戴河区");
//        al1.add("昌黎县");
        hm1.put("秦皇岛市",al1);
//        hashArray.add(hm1);

        ArrayList<String> al2 = new ArrayList<>();
        Collections.addAll(al2,"路北区","路南区","古冶区","开平区");
//        al2.add("路北区");
//        al2.add("路南区");
//        al2.add("古冶区");
//        al2.add("开平区");
        hm1.put("唐山市",al2);

        ArrayList<String> al3 = new ArrayList<>();
        Collections.addAll(al3, "石家庄市","长安区","桥东区","桥西区","新华区；");
//        al3.add("石家庄市");
//        al3.add("长安区");
//        al3.add("桥东区");
//        al3.add("桥西区");
//        al3.add("新华区");
        hm1.put("石家庄市",al3);

        hm.put("河北省",hm1);

        //河南省

        HashMap<String, ArrayList<String>> hm2 = new HashMap<>();
        ArrayList<String> al4 = new ArrayList<>();
        al4.add("中原区");
        al4.add("金水区");
        al4.add("二七区");
        al4.add("管城回族区");
        hm2.put("郑州市",al4);
//        hashArray.add(hm1);

        ArrayList<String> al5 = new ArrayList<>();
        al5.add("西工区");
        al5.add("老城区");
        al5.add("涧西区");
        al5.add("洛龙区");
        hm2.put("洛阳市",al5);

        ArrayList<String> al6 = new ArrayList<>();
        al6.add("鼓楼区");
        al6.add("龙亭区");
        al6.add("顺河回族区");
        al6.add("禹王台区");
        hm2.put("开封市",al6);

        hm.put("河南省",hm2);

        Set<Map.Entry<String, HashMap<String, ArrayList<String>>>> entries = hm.entrySet();
        for (Map.Entry<String, HashMap<String, ArrayList<String>>> entry : entries) {
            System.out.println(entry.getKey()+":");
            HashMap<String, ArrayList<String>> value = entry.getValue();
            Set<Map.Entry<String, ArrayList<String>>> entries1 = value.entrySet();
            for (Map.Entry<String, ArrayList<String>> listEntry : entries1) {
                System.out.print("\t"+listEntry.getKey()+":");
                System.out.println(listEntry.getValue());
            }
        }

    }
}
